#pragma once
#include "Game/Process/RenderProcess.h"
#include "Render/Tradition/ComputePipeline.h"
#include "Render/Shader/RHIDescriptor.h"
#include "Render/Tradition/RHIFramebuffer.h"
#include "../LocalEntity.h"
#include "../LocalShader.h"
#include "../ResourceProcess.h"
#include "../LocalScene.h"


class GroundTruthPathRayTraceProcess : public RenderProcess
{
	DECLARE_PROCESS(GroundTruthPathRayTraceProcess)

	struct PushConstants
	{
		uint32 frame;
		uint32 maxRayBounces;
		float roughnessMultiplier;
	};

public:

	PushConstants mPushConstants;

protected:

	virtual void OnInit() override;

	virtual void OnTick(float deltaTime) override;

	virtual void OnResize() override;

protected:

	LocalScene* mLocalScene;

	ResourceProcess* mResourceProcess;



	std::array<RefCountPtr<RHITexture>, 2> mColorImage;



	ShaderPtr<GroundTruthPathRayTraceRgenShader> mRgenShader;

	ShaderPtr<GroundTruthPathRayTraceRchitShader> mRchitShader;

	ShaderPtr<GroundTruthPathRayTraceRmissShader> mRmissShader;



	RefCountPtr<RHIDescriptor> mDescriptor;

	std::array<DescriptorMask, 2> mImageDescriptorMask;

	DescriptorMask mDescriptorMask;




	RefCountPtr<RayTracingPipeline> mPipeline;

};
